package XML;

import java.util.ArrayList;

public class TagXML {
	TagXML father=null;
	ArrayList<TagXML> taguri= new ArrayList<TagXML>();
	ArrayList<Attribute> atribute = new ArrayList<Attribute>();
	String nume=null;
	String value=null;
	AddAttribute atribAdder= new AddAttribute();
	DeleteAttribute atribDeleter= new DeleteAttribute();
	AddTag tagAdder= new AddTag();
	DeleteTag tagDelete= new DeleteTag();
	
	public void setNume(String s) {
		this.nume = s;
	}
	
	public ArrayList<TagXML> getTaguri() {
		return taguri;
	}
	public ArrayList<Attribute> getAtribute() {
		return atribute;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}

	public TagXML() {
		super();
	}

	public TagXML(TagXML father) {
		this.father = father;
	}

	public TagXML(TagXML father, String nume, String value) {
		this.father = father;
		this.nume = nume;
		this.value = value;
	}

	public TagXML(TagXML father, String nume) {
		this.father = father;
		this.nume = nume;
	}

	public TagXML(String nume) {
		super();
		this.nume = nume;
	}

	public TagXML(String nume, String value) {
		this.nume = nume;
		this.value = value;
	}
	
	public void addAttribute(Attribute a){
		AddAttribute cmd=new AddAttribute(this,a);
		cmd.execute();
	}
	public void deleteAttribute(Attribute a){
		DeleteAttribute cmd=new DeleteAttribute(this,a);
		cmd.execute();
		
	}
	public void addSonAttrib(Attribute a, TagXML t){
		
	}
	public void deleteSonAttrib(Attribute a, TagXML t){
		
	}
	public void addTag(TagXML t){
		AddTag cmd=new AddTag(this,t);
		cmd.execute();
		
	}
	public void deleteTag(TagXML t){
		DeleteTag cmd=new DeleteTag(this,t);
		cmd.execute();
		
	}
	
	
	
	
	
	
	

	



	}
